<html>
<head><meta charset="utf-8"><title>meeting 2021-05-12 · t-compiler/wg-rfc-2229 · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/index.html">t-compiler/wg-rfc-2229</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html">meeting 2021-05-12</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="238533938"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238533938" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238533938">(May 12 2021 at 19:53)</a>:</h4>
<p>Hey <span class="user-group-mention" data-user-group-id="1175">@WG-rfc-2229</span></p>



<a name="238534017"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238534017" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238534017">(May 12 2021 at 19:53)</a>:</h4>
<p>hello</p>



<a name="238534184"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238534184" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rocksand <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238534184">(May 12 2021 at 19:54)</a>:</h4>
<p>Hi</p>



<a name="238534292"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238534292" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238534292">(May 12 2021 at 19:55)</a>:</h4>
<p>Did you get a chance to review the blogpost</p>



<a name="238534315"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238534315" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238534315">(May 12 2021 at 19:55)</a>:</h4>
<p>no!</p>



<a name="238534319"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238534319" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238534319">(May 12 2021 at 19:55)</a>:</h4>
<p>I totally forgot</p>



<a name="238534323"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238534323" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238534323">(May 12 2021 at 19:55)</a>:</h4>
<p>where is it?</p>



<a name="238534345"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238534345" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238534345">(May 12 2021 at 19:56)</a>:</h4>
<p>i can review quickly</p>



<a name="238534402"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238534402" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238534402">(May 12 2021 at 19:56)</a>:</h4>
<p>do you think we can sync over zulip today?</p>



<a name="238534431"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238534431" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238534431">(May 12 2021 at 19:56)</a>:</h4>
<p>well, I could do zoom too, doesn' matter</p>



<a name="238534482"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238534482" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238534482">(May 12 2021 at 19:56)</a>:</h4>
<p>I added one request for some comments to <a href="https://github.com/rust-lang/rust/pull/84152">https://github.com/rust-lang/rust/pull/84152</a> (cc <span class="user-mention" data-user-id="282466">@Dhruv Jauhar</span>)</p>



<a name="238534485"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238534485" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238534485">(May 12 2021 at 19:56)</a>:</h4>
<p>Upto you <span aria-label="smile" class="emoji emoji-1f642" role="img" title="smile">:smile:</span></p>



<a name="238534515"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238534515" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238534515">(May 12 2021 at 19:57)</a>:</h4>
<p>let's try zulip, I'm kin dof zoom'd out</p>



<a name="238534605"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238534605" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238534605">(May 12 2021 at 19:57)</a>:</h4>
<p>I have lost the link the blogpost somehow, one min looking for it <span aria-label="upside down" class="emoji emoji-1f643" role="img" title="upside down">:upside_down:</span></p>



<a name="238534628"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238534628" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238534628">(May 12 2021 at 19:57)</a>:</h4>
<p><a href="https://hackmd.io/g0odgclDSaODOvBSZntltg">https://hackmd.io/g0odgclDSaODOvBSZntltg</a></p>



<a name="238534763"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238534763" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238534763">(May 12 2021 at 19:58)</a>:</h4>
<p>reading</p>



<a name="238535943"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238535943" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238535943">(May 12 2021 at 20:06)</a>:</h4>
<p>ok</p>



<a name="238535969"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238535969" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238535969">(May 12 2021 at 20:06)</a>:</h4>
<p>I'm thinking, <span class="user-mention" data-user-id="281950">@Aman Arora</span> -- I feel like this post belongs on the main rust blog</p>



<a name="238535977"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238535977" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238535977">(May 12 2021 at 20:06)</a>:</h4>
<p>not Inside Rust</p>



<a name="238535992"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238535992" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238535992">(May 12 2021 at 20:06)</a>:</h4>
<p>I thik it's audience is "all rust users'</p>



<a name="238536004"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238536004" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238536004">(May 12 2021 at 20:06)</a>:</h4>
<p>not 'rust developers and hackers'</p>



<a name="238536013"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238536013" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238536013">(May 12 2021 at 20:06)</a>:</h4>
<p>Yes that's what we were thinking too</p>



<a name="238536051"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238536051" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238536051">(May 12 2021 at 20:07)</a>:</h4>
<p>it's quite good; I think it could be improved somewhat to spell out the contxt and narrative for people</p>



<a name="238536077"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238536077" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238536077">(May 12 2021 at 20:07)</a>:</h4>
<p>some of the migration content at the end might be a bit confusing</p>



<a name="238536123"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238536123" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238536123">(May 12 2021 at 20:07)</a>:</h4>
<p>I wasn't sure how much detail we wanted to go into because it started getting pretty long</p>



<a name="238536133"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238536133" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238536133">(May 12 2021 at 20:07)</a>:</h4>
<p>But I can try add more context</p>



<a name="238536418"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238536418" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238536418">(May 12 2021 at 20:09)</a>:</h4>
<p>so</p>



<a name="238536427"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238536427" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238536427">(May 12 2021 at 20:09)</a>:</h4>
<p>I don't think it needs a lot of words</p>



<a name="238536445"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238536445" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238536445">(May 12 2021 at 20:09)</a>:</h4>
<p>I think an intro paragraph like:</p>



<a name="238536742"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238536742" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238536742">(May 12 2021 at 20:11)</a>:</h4>
<p>One of the major features of the <a href="http://...">upcoming Rust 2021 Edition</a> is a change to how Rust closures work. This change makes them more precise, eliminating common borrow check errors. The change does involve some (minor) change to Rust semantics, so it is tied to the Rust 2021 edition. Like any Edition migration, we have also created lints that will warn you of upcoming changes and suggest precise edits to preserve the semantics of your code. This blog post will explain the new feature and also tell you how you can try it out today on nightly if you like.</p>



<a name="238536783"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238536783" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238536783">(May 12 2021 at 20:12)</a>:</h4>
<p>would give everybody the "big picture" they need to get oriented</p>



<a name="238537010"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238537010" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238537010">(May 12 2021 at 20:14)</a>:</h4>
<p>I could proabbly make some edits to the parts about the precise semantics of what gets captured</p>



<a name="238537016"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238537016" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238537016">(May 12 2021 at 20:14)</a>:</h4>
<p>on the other hand</p>



<a name="238537060"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238537060" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238537060">(May 12 2021 at 20:14)</a>:</h4>
<p>I kind of think that is boring for a blog post</p>



<a name="238537079"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238537079" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238537079">(May 12 2021 at 20:14)</a>:</h4>
<p>I think what I would suggest is</p>



<a name="238537102"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238537102" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238537102">(May 12 2021 at 20:14)</a>:</h4>
<p>maybe we should turn those sections into a PR against the rust reference?</p>



<a name="238537114"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238537114" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238537114">(May 12 2021 at 20:14)</a>:</h4>
<p>and then the blog post can link to that PR</p>



<a name="238537160"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238537160" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238537160">(May 12 2021 at 20:14)</a>:</h4>
<p><a href="https://github.com/rust-lang/reference/">Rust reference repo</a></p>



<a name="238537162"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238537162" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238537162">(May 12 2021 at 20:14)</a>:</h4>
<p>WDYT?</p>



<a name="238537275"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238537275" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238537275">(May 12 2021 at 20:15)</a>:</h4>
<p>That's an interesting idea</p>



<a name="238537396"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238537396" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238537396">(May 12 2021 at 20:16)</a>:</h4>
<p>From a new comer's prespective, I'm wondering if having some degree of TLDR for each of the sections is a good idea</p>



<a name="238537450"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238537450" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238537450">(May 12 2021 at 20:16)</a>:</h4>
<p>I don't understand :)</p>



<a name="238537454"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238537454" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238537454">(May 12 2021 at 20:16)</a>:</h4>
<p>So that in case they run into some issue ,they have an idea that it has to do with the feature and not something else that did do wrong</p>



<a name="238537487"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238537487" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238537487">(May 12 2021 at 20:16)</a>:</h4>
<p>which sections?</p>



<a name="238537512"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238537512" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238537512">(May 12 2021 at 20:17)</a>:</h4>
<p>I think the capture precision one -- since they are the edge cases</p>



<a name="238537834"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238537834" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238537834">(May 12 2021 at 20:19)</a>:</h4>
<p>I left some comments there</p>



<a name="238537847"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238537847" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238537847">(May 12 2021 at 20:19)</a>:</h4>
<p>i think there is also something missing, or maybe we didn't implement it</p>



<a name="238537874"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238537874" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238537874">(May 12 2021 at 20:19)</a>:</h4>
<p>maybe my summary is even wrong, I forget</p>



<a name="238537949"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238537949" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238537949">(May 12 2021 at 20:20)</a>:</h4>
<p>there's <em>some</em> rule about <code>&amp;mut</code> references</p>



<a name="238537955"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238537955" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238537955">(May 12 2021 at 20:20)</a>:</h4>
<p>what is it</p>



<a name="238537998"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238537998" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238537998">(May 12 2021 at 20:20)</a>:</h4>
<p>One sec</p>



<a name="238538047"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238538047" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238538047">(May 12 2021 at 20:20)</a>:</h4>
<blockquote>
<p>This change to closure captures will most likely increase the size of any closure that uses it (since we can now capture many disjoint paths whereas before they could all be caputured by just the root variable). Changes in memory footprint will need to be profiled. We are also looking for user feedback, so please try this feature out :).</p>
</blockquote>



<a name="238538066"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238538066" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238538066">(May 12 2021 at 20:21)</a>:</h4>
<p>I think this overstates the case, too</p>



<a name="238538107"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238538107" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238538107">(May 12 2021 at 20:21)</a>:</h4>
<p>we did measure and found that it had very little effect, I think we can say that</p>



<a name="238538136"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238538136" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238538136">(May 12 2021 at 20:21)</a>:</h4>
<p>is there a way for people to get data?</p>



<a name="238538167"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238538167" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238538167">(May 12 2021 at 20:21)</a>:</h4>
<p>we might "crowdsource" by having them post their data into an internals thread or google spreadsheet or something</p>



<a name="238538177"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238538177" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238538177">(May 12 2021 at 20:21)</a>:</h4>
<p>that'd be useful</p>



<a name="238538211"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238538211" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238538211">(May 12 2021 at 20:21)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/pull/82007">https://github.com/rust-lang/rust/pull/82007</a></p>



<a name="238538284"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238538284" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238538284">(May 12 2021 at 20:22)</a>:</h4>
<p>oh right</p>



<a name="238538287"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238538287" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238538287">(May 12 2021 at 20:22)</a>:</h4>
<p>this was specific to move closures</p>



<a name="238538295"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238538295" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238538295">(May 12 2021 at 20:22)</a>:</h4>
<p>where sometimes a "move closure" still winds up capturing by mut ref</p>



<a name="238538314"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238538314" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238538314">(May 12 2021 at 20:22)</a>:</h4>
<p>Yes</p>



<a name="238538323"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238538323" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238538323">(May 12 2021 at 20:22)</a>:</h4>
<p>yeah that's worth calling out</p>



<a name="238538347"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238538347" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238538347">(May 12 2021 at 20:22)</a>:</h4>
<p>I still think the blog post should be pretty vague</p>



<a name="238538355"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238538355" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238538355">(May 12 2021 at 20:22)</a>:</h4>
<p>Because we won't be moving use-by-ref in a non move closure</p>



<a name="238538367"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238538367" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238538367">(May 12 2021 at 20:22)</a>:</h4>
<p>and reference a PR with the full details</p>



<a name="238538417"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238538417" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238538417">(May 12 2021 at 20:23)</a>:</h4>
<p>Okay</p>



<a name="238538426"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238538426" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238538426">(May 12 2021 at 20:23)</a>:</h4>
<p>something like "the precise path that gets captured is typically the full path that is used, but there are cases where we will only capture a prefix of the path. See [this pending PR to the Rust reference] for the full details."</p>



<a name="238538528"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238538528" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238538528">(May 12 2021 at 20:24)</a>:</h4>
<p>ok, cool, this is great</p>



<a name="238538554"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238538554" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238538554">(May 12 2021 at 20:24)</a>:</h4>
<p>----- Closure size -----</p>



<a name="238538629"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238538629" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238538629">(May 12 2021 at 20:24)</a>:</h4>
<p>So I looked into some of the increases and some of them I don't have an answer why there is an increase</p>



<a name="238538638"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238538638" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238538638">(May 12 2021 at 20:24)</a>:</h4>
<p><a href="https://github.com/rust-lang/cargo/blob/master/crates/cargo-util/src/paths.rs#L409-L413">https://github.com/rust-lang/cargo/blob/master/crates/cargo-util/src/paths.rs#L409-L413</a></p>



<a name="238538659"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238538659" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238538659">(May 12 2021 at 20:25)</a>:</h4>
<p><a href="https://github.com/rust-lang/cargo/blob/master/src/cargo/core/compiler/fingerprint.rs#L736-L742">https://github.com/rust-lang/cargo/blob/master/src/cargo/core/compiler/fingerprint.rs#L736-L742</a></p>



<a name="238538678"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238538678" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238538678">(May 12 2021 at 20:25)</a>:</h4>
<p>In both cases closure sizes goes from 8 -&gt; 16</p>



<a name="238538729"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238538729" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238538729">(May 12 2021 at 20:25)</a>:</h4>
<p>hmm</p>



<a name="238538733"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238538733" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238538733">(May 12 2021 at 20:25)</a>:</h4>
<p>those are curious</p>



<a name="238538752"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238538752" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238538752">(May 12 2021 at 20:25)</a>:</h4>
<p>i wonder</p>



<a name="238538779"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238538779" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238538779">(May 12 2021 at 20:25)</a>:</h4>
<p>i have a <em>thought</em></p>



<a name="238538802"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238538802" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238538802">(May 12 2021 at 20:26)</a>:</h4>
<p>could we be capturing a fat pointer somehow?</p>



<a name="238538864"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238538864" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238538864">(May 12 2021 at 20:26)</a>:</h4>
<p>they are both calls to <code>Path::display</code>...</p>



<a name="238538893"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238538893" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238538893">(May 12 2021 at 20:26)</a>:</h4>
<p>...that sholdn't matter</p>



<a name="238538912"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238538912" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238538912">(May 12 2021 at 20:26)</a>:</h4>
<p>yes, i think there are some other cases to display</p>



<a name="238538922"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238538922" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238538922">(May 12 2021 at 20:26)</a>:</h4>
<p>i bet if you dumped the MIR it'd be obvious</p>



<a name="238538947"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238538947" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238538947">(May 12 2021 at 20:26)</a>:</h4>
<p>Okay, I'll try that</p>



<a name="238538957"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238538957" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238538957">(May 12 2021 at 20:26)</a>:</h4>
<p>you know about <code>-Zdump-mir=create_dir_all</code></p>



<a name="238538960"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238538960" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238538960">(May 12 2021 at 20:26)</a>:</h4>
<p>Didn't think of that</p>



<a name="238538963"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238538963" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238538963">(May 12 2021 at 20:27)</a>:</h4>
<p>and stuff like that?</p>



<a name="238539007"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238539007" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238539007">(May 12 2021 at 20:27)</a>:</h4>
<p>I know dump-mir yea</p>



<a name="238539049"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238539049" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238539049">(May 12 2021 at 20:27)</a>:</h4>
<p>then we also have the exemplar for our optimizaiton that we were talking about</p>



<a name="238539062"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238539062" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238539062">(May 12 2021 at 20:27)</a>:</h4>
<p><a href="https://github.com/rust-lang/cargo/blob/master/src/cargo/core/resolver/features.rs#L132-L151">https://github.com/rust-lang/cargo/blob/master/src/cargo/core/resolver/features.rs#L132-L151</a></p>



<a name="238539242"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238539242" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238539242">(May 12 2021 at 20:29)</a>:</h4>
<p>wait what's that</p>



<a name="238539322"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238539322" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238539322">(May 12 2021 at 20:29)</a>:</h4>
<p><span class="user-mention silent" data-user-id="281950">Aman Arora</span> <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/meeting.202021-05-12/near/238539049">said</a>:</p>
<blockquote>
<p>then we also have the exemplar for our optimizaiton that we were talking about</p>
</blockquote>
<p>I don't understand this :)</p>



<a name="238539425"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238539425" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238539425">(May 12 2021 at 20:30)</a>:</h4>
<p>every field is captured and the closure size increases significantly</p>



<a name="238539492"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238539492" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238539492">(May 12 2021 at 20:30)</a>:</h4>
<p>oh, I see</p>



<a name="238539548"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238539548" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238539548">(May 12 2021 at 20:30)</a>:</h4>
<p>and the idea is that we could recognize that and just capture <code>opts</code></p>



<a name="238539669"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238539669" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238539669">(May 12 2021 at 20:31)</a>:</h4>
<p>that seems nice, if we found even one instance :)</p>



<a name="238539684"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238539684" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238539684">(May 12 2021 at 20:31)</a>:</h4>
<p>Yes</p>



<a name="238539687"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238539687" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238539687">(May 12 2021 at 20:31)</a>:</h4>
<p>it's not <em>that</em> hard to do, I imagine</p>



<a name="238539750"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238539750" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238539750">(May 12 2021 at 20:32)</a>:</h4>
<p>I don't think so, we already do something similar in migrations</p>



<a name="238539763"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238539763" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238539763">(May 12 2021 at 20:32)</a>:</h4>
<p>we already have the mechanism to capture prefixes</p>



<a name="238539775"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238539775" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238539775">(May 12 2021 at 20:32)</a>:</h4>
<p>yes, and that</p>



<a name="238539847"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238539847" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238539847">(May 12 2021 at 20:33)</a>:</h4>
<p>I was thinking maybe I try implement this and compare graphs. Might be quicker than verifiying each closure. Cargo seemed to have a couple of those display() increases</p>



<a name="238540044"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238540044" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238540044">(May 12 2021 at 20:34)</a>:</h4>
<p>The clsoure size here goes from 40 to 48</p>



<a name="238540053"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238540053" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238540053">(May 12 2021 at 20:34)</a>:</h4>
<p><a href="https://github.com/rust-lang/cargo/blob/master/src/cargo/core/compiler/unit_dependencies.rs#L787-L809">https://github.com/rust-lang/cargo/blob/master/src/cargo/core/compiler/unit_dependencies.rs#L787-L809</a><br>
I'm not sure why</p>



<a name="238540162"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238540162" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238540162">(May 12 2021 at 20:34)</a>:</h4>
<p>we use self entirely in the closure<br>
I"ll probalby dump out the capture analysis for this</p>



<a name="238540189"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238540189" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238540189">(May 12 2021 at 20:35)</a>:</h4>
<p>yeah</p>



<a name="238540199"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238540199" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238540199">(May 12 2021 at 20:35)</a>:</h4>
<p>there might be some bugs lurking here</p>



<a name="238540225"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238540225" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238540225">(May 12 2021 at 20:35)</a>:</h4>
<p>I agree that is curious</p>



<a name="238540263"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238540263" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238540263">(May 12 2021 at 20:35)</a>:</h4>
<p>good idea to do some deep dives</p>



<a name="238540350"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238540350" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238540350">(May 12 2021 at 20:36)</a>:</h4>
<p>One issue with size is that we can't handle generics</p>



<a name="238540388"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238540388" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238540388">(May 12 2021 at 20:36)</a>:</h4>
<p>what do you mean?</p>



<a name="238540397"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238540397" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238540397">(May 12 2021 at 20:36)</a>:</h4>
<p>So if a closure is present within a function body that is generic over sometype T, layout computaiton fails</p>



<a name="238540409"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238540409" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238540409">(May 12 2021 at 20:36)</a>:</h4>
<p><em>oh</em></p>



<a name="238540413"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238540413" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238540413">(May 12 2021 at 20:36)</a>:</h4>
<p><a href="http://csclub.uwaterloo.ca/~a52arora/compiler_size">http://csclub.uwaterloo.ca/~a52arora/compiler_size</a></p>



<a name="238540423"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238540423" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238540423">(May 12 2021 at 20:36)</a>:</h4>
<p>Search for "Failed"</p>



<a name="238540439"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238540439" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238540439">(May 12 2021 at 20:36)</a>:</h4>
<p>you mean you can't measure the size of (generic) closures because you are measuring them pre-monomorphization</p>



<a name="238540542"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238540542" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238540542">(May 12 2021 at 20:37)</a>:</h4>
<p>I thinnk so</p>



<a name="238540624"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238540624" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238540624">(May 12 2021 at 20:38)</a>:</h4>
<p>So I have moved this to mir_build instead of typeck</p>



<a name="238540644"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238540644" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238540644">(May 12 2021 at 20:38)</a>:</h4>
<p>because i was running into some typeck erorrs</p>



<a name="238540664"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238540664" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238540664">(May 12 2021 at 20:38)</a>:</h4>
<p>And that was suggested in compiler-help</p>



<a name="238540807"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238540807" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238540807">(May 12 2021 at 20:39)</a>:</h4>
<p>I am wondering if we could move it to the monomorphizaion time</p>



<a name="238540811"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238540811" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238540811">(May 12 2021 at 20:39)</a>:</h4>
<p>e.g., during codegen</p>



<a name="238540813"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238540813" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238540813">(May 12 2021 at 20:39)</a>:</h4>
<p>or the collector</p>



<a name="238540872"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238540872" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238540872">(May 12 2021 at 20:40)</a>:</h4>
<p>then we could dump out every closure <em>in practice</em></p>



<a name="238540915"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238540915" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238540915">(May 12 2021 at 20:40)</a>:</h4>
<p>I could give you some tips on that</p>



<a name="238540922"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238540922" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238540922">(May 12 2021 at 20:40)</a>:</h4>
<p>I'm not sure where that code would be</p>



<a name="238540948"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238540948" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238540948">(May 12 2021 at 20:40)</a>:</h4>
<p>thank you, that would be helpful</p>



<a name="238540978"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238540978" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238540978">(May 12 2021 at 20:41)</a>:</h4>
<p>i'm pulling up the code</p>



<a name="238541010"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238541010" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238541010">(May 12 2021 at 20:41)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/blob/master/compiler/rustc_mir/src/monomorphize/collector.rs#L1-L2">the collector</a></p>



<a name="238541093"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238541093" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238541093">(May 12 2021 at 20:42)</a>:</h4>
<p>I'm trying to find the "right place to put some code"</p>



<a name="238541122"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238541122" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238541122">(May 12 2021 at 20:42)</a>:</h4>
<p>i get 404</p>



<a name="238541134"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238541134" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238541134">(May 12 2021 at 20:42)</a>:</h4>
<p>on that link</p>



<a name="238541157"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238541157" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238541157">(May 12 2021 at 20:42)</a>:</h4>
<p>so you do</p>



<a name="238541194"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238541194" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238541194">(May 12 2021 at 20:42)</a>:</h4>
<p>try it now</p>



<a name="238541315"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238541315" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238541315">(May 12 2021 at 20:43)</a>:</h4>
<p>you may want to intercept at <a href="https://github.com/rust-lang/rust/blob/master/compiler/rustc_mir/src/monomorphize/collector.rs#L1011-L1018">the <code>create_fn_mono_item</code> function</a></p>



<a name="238541408"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238541408" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238541408">(May 12 2021 at 20:44)</a>:</h4>
<p>that gets invoked each time we decide to generate code for a particular monomorphiztion</p>



<a name="238541432"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238541432" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238541432">(May 12 2021 at 20:44)</a>:</h4>
<p>right</p>



<a name="238541473"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238541473" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238541473">(May 12 2021 at 20:44)</a>:</h4>
<p>you could check if the <code>Instance</code> refers to a closure</p>



<a name="238541513"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238541513" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238541513">(May 12 2021 at 20:45)</a>:</h4>
<p>I'm assuming that would also give us the ty and the sustsituions</p>



<a name="238541599"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238541599" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238541599">(May 12 2021 at 20:45)</a>:</h4>
<p>the Closure ty *</p>



<a name="238541619"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238541619" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238541619">(May 12 2021 at 20:46)</a>:</h4>
<p>right</p>



<a name="238541680"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238541680" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238541680">(May 12 2021 at 20:46)</a>:</h4>
<p>so an <code>Instance</code>...</p>



<a name="238541698"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238541698" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238541698">(May 12 2021 at 20:46)</a>:</h4>
<p><a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.Instance.html">https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.Instance.html</a></p>



<a name="238541733"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238541733" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238541733">(May 12 2021 at 20:46)</a>:</h4>
<p>you would be lookin for a <code>InstanceDef::Item</code></p>



<a name="238541734"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238541734" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238541734">(May 12 2021 at 20:46)</a>:</h4>
<p><a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/instance/enum.InstanceDef.html#variant.Item">https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/instance/enum.InstanceDef.html#variant.Item</a></p>



<a name="238541744"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238541744" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238541744">(May 12 2021 at 20:46)</a>:</h4>
<p>which basically has a <code>DefId</code> in there</p>



<a name="238541782"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238541782" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238541782">(May 12 2021 at 20:47)</a>:</h4>
<p>honestly just call <code>def_id</code> method</p>



<a name="238541867"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238541867" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238541867">(May 12 2021 at 20:47)</a>:</h4>
<p>and use <a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/context/struct.TyCtxt.html#method.is_closure"><code>is_closure</code></a> to test what it is</p>



<a name="238541946"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238541946" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238541946">(May 12 2021 at 20:48)</a>:</h4>
<p>so something like <code>if tcx.is_closure(instance.def_id())</code></p>



<a name="238541949"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238541949" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238541949">(May 12 2021 at 20:48)</a>:</h4>
<p>We would still need access to the typeckresults, which we won't have in case this is a downstream crate</p>



<a name="238541974"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238541974" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238541974">(May 12 2021 at 20:48)</a>:</h4>
<p>just do it for local closures</p>



<a name="238541987"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238541987" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238541987">(May 12 2021 at 20:48)</a>:</h4>
<p>okay</p>



<a name="238542000"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238542000" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238542000">(May 12 2021 at 20:48)</a>:</h4>
<p><code>if instance.def_id().is_local() &amp;&amp; ...</code></p>



<a name="238542034"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238542034" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238542034">(May 12 2021 at 20:48)</a>:</h4>
<p>makes sense</p>



<a name="238542079"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238542079" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238542079">(May 12 2021 at 20:49)</a>:</h4>
<p>I suppose if we are supposed to see an increase we will see it regardless</p>



<a name="238542112"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238542112" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238542112">(May 12 2021 at 20:49)</a>:</h4>
<p>regardless of the substituted type</p>



<a name="238542262"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238542262" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238542262">(May 12 2021 at 20:50)</a>:</h4>
<p>not necessarily</p>



<a name="238542285"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238542285" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238542285">(May 12 2021 at 20:50)</a>:</h4>
<p>maybe? I'm not sure :)</p>



<a name="238542298"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238542298" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238542298">(May 12 2021 at 20:50)</a>:</h4>
<p>I wouldn't be surprised if there were edge cases</p>



<a name="238542384"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238542384" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238542384">(May 12 2021 at 20:51)</a>:</h4>
<p>fair enough, I was assuming all the generics conform to some trait. Maybe copy vs non-copy type</p>



<a name="238542401"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238542401" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238542401">(May 12 2021 at 20:51)</a>:</h4>
<p>We'll find out haha</p>



<a name="238542822"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238542822" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238542822">(May 12 2021 at 20:54)</a>:</h4>
<p>yep</p>



<a name="238542844"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238542844" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238542844">(May 12 2021 at 20:54)</a>:</h4>
<p>i think connecting at monomorphization time would be the easiest</p>



<a name="238542857"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238542857" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238542857">(May 12 2021 at 20:54)</a>:</h4>
<p>and it also might be good because</p>



<a name="238542873"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238542873" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238542873">(May 12 2021 at 20:54)</a>:</h4>
<p>maybe some change looks small but is big inpractice</p>



<a name="238542944"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/238542944" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#238542944">(May 12 2021 at 20:55)</a>:</h4>
<p>fair enough</p>



<a name="240095561"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/240095561" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#240095561">(May 24 2021 at 18:58)</a>:</h4>
<p>I'd like some help to figure out how in <a href="https://github.com/rust-lang/rust/blob/master/compiler/rustc_middle/src/ty/instance.rs#L527">polymorphise</a> I get <a href="https://github.com/rust-lang/rust/blob/master/compiler/rustc_mir/src/monomorphize/polymorphize.rs#L34">unused generics</a> without reworking or duplicating a lot of the code for the two closure tys (before and after the feature)</p>



<a name="240102935"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/240102935" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#240102935">(May 24 2021 at 19:53)</a>:</h4>
<p>they may not have a lot of time to do so, but the expert in polymorphization is <span class="user-mention" data-user-id="116107">@davidtwco</span></p>



<a name="240103177"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/240103177" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#240103177">(May 24 2021 at 19:55)</a>:</h4>
<p>I don't have huge amounts of time right now, and I'm a little rusty (pun not intended), but I'll help where I can.</p>



<a name="240103480"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/240103480" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#240103480">(May 24 2021 at 19:57)</a>:</h4>
<p>(quality pun <span aria-label="fire" class="emoji emoji-1f525" role="img" title="fire">:fire:</span>)</p>



<a name="240106801"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/240106801" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#240106801">(May 24 2021 at 20:24)</a>:</h4>
<p>The current issue that I'm running into is that when I try compute the size of a closure in mir_build, we run into some closures that have generics they inherit from their parents that have not being monomorphised.</p>



<a name="240106934"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/240106934" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#240106934">(May 24 2021 at 20:25)</a>:</h4>
<p>Outside of how data is pipelined right now for the same def_id, I have another <code>ty::Closure</code>, that I'd like to profile the size of. And this represents the closure after the capture disjoint fields feature</p>



<a name="240107020"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/240107020" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#240107020">(May 24 2021 at 20:26)</a>:</h4>
<p>I'm tyring to figure out if there is a nice way to figure out the size of this closure without having to completely change how the data is pipelined.</p>



<a name="240183664"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/240183664" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#240183664">(May 25 2021 at 13:04)</a>:</h4>
<p>Sorry, didn't have time to respond to this last night, I'm not sure I exactly understand your problem - polymorphization's analysis presently determines whether a function/closure/generator/etc has generics which go unused - is your issue that the analysis is doing that incorrectly for some case, or that you need to modify the polymorphization logic to support RFC 2229's improvements to closure captures?</p>



<a name="240222878"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/240222878" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#240222878">(May 25 2021 at 17:32)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116107">davidtwco</span> <a href="#narrow/stream/189812-t-compiler.2Fwg-rfc-2229/topic/meeting.202021-05-12/near/240183664">said</a>:</p>
<blockquote>
<p>Sorry, didn't have time to respond to this last night, I'm not sure I exactly understand your problem - polymorphization's analysis presently determines whether a function/closure/generator/etc has generics which go unused - is your issue that the analysis is doing that incorrectly for some case, or that you need to modify the polymorphization logic to support RFC 2229's improvements to closure captures?</p>
</blockquote>
<p><span class="user-mention" data-user-id="116107">@davidtwco</span>  I should've shared what I was trying. </p>
<p><a href="https://github.com/sexxi-goose/rust/blob/7c8ac231481d302c6a66691fa8f6bb6ef9a9c49b/compiler/rustc_mir/src/monomorphize/collector.rs#L1017-L1026">https://github.com/sexxi-goose/rust/blob/7c8ac231481d302c6a66691fa8f6bb6ef9a9c49b/compiler/rustc_mir/src/monomorphize/collector.rs#L1017-L1026</a></p>
<p>So here old=pre feature new=post feature</p>
<p>Even when the feature flag is not set, we compute the type of closure post feature and store it in TypeckResults. Currently the polymorhypishm passes around the def id to do most of the communicaiton. Is there a simpler way than to duplicate a lot of the code so that I can monomorphise the new closure type and get the size of it.</p>



<a name="240223224"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202021-05-12/near/240223224" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202021-05-12.html#240223224">(May 25 2021 at 17:34)</a>:</h4>
<p>Right now I get </p>
<div class="codehilite"><pre><span></span><code>0, Failed Unknown(impl FnMut(B, T) -&gt; B),  ....
</code></pre></div>
<p>and also </p>
<div class="codehilite"><pre><span></span><code>error: internal compiler error: compiler/rustc_traits/src/normalize_erasing_regions.rs:54:32: could not fully normalize `[closure@library/core/src/iter/traits/iterator.rs:250:13: 250:33]`
</code></pre></div>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>